package com.freeng.business.service.impl;

import java.util.List;
import com.freeng.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.freeng.business.mapper.SystemNotificationMapper;
import com.freeng.business.domain.SystemNotification;
import com.freeng.business.service.ISystemNotificationService;

/**
 * 预警提示Service业务层处理
 * 
 * @author freeng
 * @date 2024-09-10
 */
@Service
public class SystemNotificationServiceImpl implements ISystemNotificationService 
{
    @Autowired
    private SystemNotificationMapper systemNotificationMapper;

    /**
     * 查询预警提示
     * 
     * @param id 预警提示主键
     * @return 预警提示
     */
    @Override
    public SystemNotification selectSystemNotificationById(Long id)
    {
        return systemNotificationMapper.selectSystemNotificationById(id);
    }

    /**
     * 查询预警提示列表
     * 
     * @param systemNotification 预警提示
     * @return 预警提示
     */
    @Override
    public List<SystemNotification> selectSystemNotificationList(SystemNotification systemNotification)
    {
        return systemNotificationMapper.selectSystemNotificationList(systemNotification);
    }

    /**
     * 新增预警提示
     * 
     * @param systemNotification 预警提示
     * @return 结果
     */
    @Override
    public int insertSystemNotification(SystemNotification systemNotification)
    {
        systemNotification.setCreateTime(DateUtils.getNowDate());
        return systemNotificationMapper.insertSystemNotification(systemNotification);
    }

    /**
     * 修改预警提示
     * 
     * @param systemNotification 预警提示
     * @return 结果
     */
    @Override
    public int updateSystemNotification(SystemNotification systemNotification)
    {
        return systemNotificationMapper.updateSystemNotification(systemNotification);
    }

    /**
     * 批量删除预警提示
     * 
     * @param ids 需要删除的预警提示主键
     * @return 结果
     */
    @Override
    public int deleteSystemNotificationByIds(Long[] ids)
    {
        return systemNotificationMapper.deleteSystemNotificationByIds(ids);
    }

    /**
     * 删除预警提示信息
     * 
     * @param id 预警提示主键
     * @return 结果
     */
    @Override
    public int deleteSystemNotificationById(Long id)
    {
        return systemNotificationMapper.deleteSystemNotificationById(id);
    }
}
